const path = require('path')

module.exports = {
  chainWebpack: (config) => {
    config.resolve.alias.set('@icon', path.resolve('src/assets/icon')),
    config.resolve.alias.set('@comp', path.resolve('src/components'))
  },

  productionSourceMap: false,
  publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
  runtimeCompiler: true,
  lintOnSave: false,

  css: {
    loaderOptions: {
      stylus: {
        'resolve url': true,
        'import': [
          './src/theme'
        ]
      }
    }
  },

  pluginOptions: {
    'cube-ui': {
      postCompile: true,
      theme: true
    }
  }
}
